//
// Created by whg on 2025-06-06.
//

#include "global.hpp"
#include "object/pyString.hpp"
#include "runtime/functionObject.hpp"

PyInteger* Global::PyTrue = nullptr;
PyInteger* Global::PyFalse = nullptr;

PyObject* Global::PyNone = nullptr;

void Global::init() {
    PyTrue = new PyInteger(1);
    PyFalse = new PyInteger(0);

    PyNone = new PyObject();

    PyDict* strDict = new PyDict();
    StringKlass::getInstance()->setDict(strDict);
    strDict->put(new PyString("upper"), new FunctionObject(upper));
}

void Global::destroy() {

}

